#include "widget.h"
#include "ui_widget.h"
#include<QIcon>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    QIcon icon(":/BHDCIHECGBIAC-w0u1DWDwc7.png");
    setWindowIcon(icon);
//    setWindowIcon({":/BHDCIHECGBIAC-w0u1DWDwc7.png"});
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_add_opacity_clicked()
{
    if(windowOpacity()<=0.8)
    {
        opacityLevel += 0.2;
        setWindowOpacity(opacityLevel);
    }
    else
        qDebug("almost the most!!!");
}

void Widget::on_pushButton_sub_opacity_2_clicked()
{
    if(windowOpacity()>=0.2)
    {
        opacityLevel -= 0.2;
        setWindowOpacity(opacityLevel);
    }
    else
        qDebug("almost the least!!!");
}
